import { request } from './request'
import { orderURL } from '../utils/allUrl'

/* 创建订单 */
export function createOrder(data) {
  return request({
    method: 'POST',
    url: orderURL.createOrder,
    data
  })
}

/* 查询订单 */
export function queryOrder(order_number) {
  return request({
    method: 'POST',
    url: orderURL.queryOrder,
    data: {
      order_number
    }
  })
}

/* 所有订单展示 */
export function queryAllOrder(type) {
  return request({
    method: 'GET',
    url: orderURL.allOrder,
    data: {
      type
    }
  })
}